package com.magic.web.common.controller;

import java.net.Authenticator;
import java.net.PasswordAuthentication;

public class BasicAuthenticator extends Authenticator{
	 /** 
      * ����ȫ�ֱ������û�������
     */ 
	 private String userName; 
     private String password; 
   
    public BasicAuthenticator(String userName, String password) { 
        this.userName = userName; 
        this.password = password; 
    } 
	       
    @Override 
    protected PasswordAuthentication getPasswordAuthentication() { 
        return new PasswordAuthentication(userName, password.toCharArray()); 
    } 
}
